package service.impl;

import service.IPaymentStrategy;

/**
 * 具体策略类：微信支付
 */
public class WechatPayStrategy implements IPaymentStrategy {
    // 微信OpenID
    private final String openId; // 微信OpenID

    public WechatPayStrategy(String openId) {
        this.openId = openId;
    }
    @Override
    public void pay(double amount) {
        // 模拟调用微信支付SDK的复杂逻辑
        System.out.printf("使用微信OpenID [%s] 支付了 ￥%.2f 元。\n", openId, amount);
    }
}
